The prior art file system is outlined in a block diagram in FIG. 5.
The prior art file system as illustrated in FIG. 5 is so configured that the memory area in the memory storage is divided into data blocks of a certain size, 8 kilobytes, for example, each data block is given a block number and its utilization status is controlled by a memory managing means (not shown in the figure) provided within the memory storage 90.
When a new file is to be formed, a file forming means 10 directs a data block allocation means 30 to allocate blocks for the new file. The file forming means 10 also obtains the numbers of the respective fragments of the data; these numbers, which correspond to the offset numbers of the file and shall be hereinafter called offset numbers, are given when the data to write is fragmented in the aforesaid data block size and are matched with the order of the fragmentation as, for example, F1, F2 . . . as shown in FIG. 5. The file forming means 10 then notifies a data writing means 40 of the data to write, that is the aforesaid fragmented data, and the offset numbers 0k in which k is a suffix, a positive integer, indicating the standing or order of the offset numbers.
Meanwhile, the memory managing means in the memory storage 90 supervises the unoccupation or occupation status of the respective data blocks, and the data block allocation means 30 searches that memory managing means for an unoccupied block in the memory storage 90 and notifies the data writing means 40 of the available block number Dij. By the way, the suffix ij indicates the position of a data block and all the block numbers should be one series of consecutive numbers on the memory storage 90, but for the sake of convenience, it is understood, i indicates a section made up of consecutive data blocks and is expressed in the capital letter of the alphabet (A, B . . . ) and j indicates the specific data block in the section i and is represented by a positive integer.
The data writing means 40 in turn notifies the block registering means 410 of the received block number Dij and the offset number 0k obtained from the file forming means 10. The block registering means 410 then registers with a block table Tb the received offset number 0k matched with the block number Dij and stores this block table Tb in the memory storage 90.
The data writing means 40 then writes the data in the space for the received block number Dij in the memory storage 90.
FIG. 6 is a conceptional diagram showing the makeup of a block table Tb in the prior art file system. With each block table Tb are registered the block numbers Dij representing the respective data blocks DA1, DA2 . . . DAm, DB1, . . . DBn in order of the corresponding offset numbers 0k. It is noted that the data blocks in the first series are physically consecutive from DA1, DA2, . . . DAm on the memory storage 90 and those in the other series run successively from DB1, DB2, . . . DBn, but no consecutiveness exists between the series with a suffix A and that with a suffix B.
When a specific file data stored in that state is to be read out on demand from outside, a file read-out means 20 notifies a block take-out means 420 of the offset number 0k for the file to be read out.
In practice, the aforesaid offset number 0k is inputted in the form of the time from the top and, in case of a file provided with a subheading, data to designate the subheading, and the file read-out means 20 gets an offset number on the basis of the inputted data.
In the next step, the block take-out means 420 reads out the aforesaid block table Tb stored in the memory storage 90, acquires the block number Dij from the block table Tb corresponding to the given offset number 0k and notifies the data read-out means 50 of that number. Receiving the block number Dij, the data read-out means 50 reads out the wanted data from the space on the memory storage indicated by the block number Dij and forwards the data to the file read-out means 20.
In the video server and the video-on-demand system, for example, it is necessary to read out image data and audio data from the memory storage 90 continuously and quickly. The cache technology, however, keeps the data read out from the memory storage 90 temporarily in a buffer, from which the needed data are picked out one by one. So in this operation, the time needed for the readout from the memory storage 90 to the buffer or the reading out from the buffer to outside differs with the processing size, block size, for example, and is so long that the data can not be processed very well on a continuous basis.
Suppose that a data compacted or reduced using an MPEG1 standard is to be written in and read out of 8-kilobyte-data blocks at the rate of 1.5 megabits/second or 192 kilobytes/second, for example. If the block table Tb is also 8 kilobytes in size and the block number is 4 bytes, then one block table Tb can manage data equivalent to only 85 seconds. In processing a long-hour image data, a large number of block tables Tb will have to be accessed, requiring a vast time.
To cope with that, it is proposed that when a specific length of file is allocated on the memory storage 90 in data writing, care is so taken that the physical area continuity or consecutiveness of consecutive data blocks is maintained on the memory storage 90 as far as possible.
At the start of reading out the data, furthermore, all the block numbers Dij for the data blocks allocated to the file are in advance read out on the block take-out means 420. This way, data can be read out at a high speed without reading out the contents of the block table Tb from the memory storage 90 while the data is read out.
In the above process the block table Tb which manages the block numbers Dij has to be read out, in a lump, from the memory storage 90 before the data starts to be read out. No more access to the table Tb is needed, though.
In that process, the consecutiveness of data blocks is recognizable on the basis of the consecutiveness of offset numbers. In the makeup of the block table Tb as above, however, the consecutiveness of data blocks can not be judged unless the block table Tb is read out from the memory storage 90 even if a plurality of data blocks in the same file are consecutive ones. In other words, all the contents in the block table Tb have to be read out at the start of reading out the data, and this method does not work very well when a speedier processing is required.
The present invention addresses that problem encountered with the prior art file system. And it is an object of the present invention to provide a file system and a method of managing the same, which reduces the amount of block tables to be read out before reading out data from the memory storage and permits a speedier processing of data.